#导入flask
from flask import Flask,request
#实例化对象
app = Flask(__name__)
#加载配制文件
from config import Config
app.config.from_object(Config)


#添加展示
@app.route('/',methods=['POST','GET'])
def newsM():
    #判断请求方式
    if request.method == "POST":
        #添加
        #获取用户输入
        username = request.form.get('username')
        #返回
        return username
    else:
        userid = request.args.get('userid')
        name = request.args.get('name')
        return name


#运行
if __name__ == "__main__":
    app.run()